package com.hxs.learn.entity.core;

import java.util.Date;

import org.apache.ibatis.type.Alias;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.mapper.SqlCondition;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.hxs.learn.common.entity.BaseEntity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author huxinsheng
 * @date 2018-04-24 15:32:13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "hospital_info")
@Alias(value = "hospitalInfo")
public class HospitalInfo implements BaseEntity {

    /**
     * 编号
     */
    @TableId(
            value = "id",
            type = IdType.INPUT
    )
    private String id;

    /**
     * logo
     */
    @TableField(value = "logo")
    private Integer logo;

    /**
     * 组织机构名称
     */
    @TableField(
            value = "orgName",
            strategy = FieldStrategy.NOT_EMPTY,
            condition = SqlCondition.LIKE_RIGHT
    )
    private String orgName;

    /**
     * 医院名称
     */
    @TableField(
            value = "name",
            strategy = FieldStrategy.NOT_EMPTY,
            condition = SqlCondition.LIKE_RIGHT
    )
    private String name;

    /**
     * 组织机构代码
     */
    @TableField(
            value = "orgCode",
            strategy = FieldStrategy.NOT_EMPTY
    )
    private String orgCode;

    /**
     * 医院网址
     */
    @TableField(
            value = "website",
            strategy = FieldStrategy.NOT_EMPTY
    )
    private String website;


    /**
     * 创建人
     */
    @TableField(
            value = "creator",
            strategy = FieldStrategy.NOT_EMPTY
    )
    private String creator;

    /**
     * 创建日期
     */
    @TableField(value = "createTime")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(
            value = "updateBy",
            strategy = FieldStrategy.NOT_EMPTY
    )
    private String updateBy;

    /**
     * 创建日期
     */
    @TableField(value = "updateTime")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date updateTime;
}


//~ Formatted by Jindent --- http://www.jindent.com
